<!DOCTYPE html>
<html>
    <head>
        <title>360湘江世纪城</title>
        <#include "controls/public_header.ftl">
        <script type="text/javascript">
			var goods_id = <#if model._param.id?exists>"${model._param.id}"<#else>""</#if>;
		</script>
		<link rel="stylesheet" href="${model._contextPath}/web/resources/lib/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
		<script type="text/javascript" src="${model._contextPath}/web/resources/lib/zTree/js/jquery.ztree.core-3.5.js"></script>
		<link rel="stylesheet" href="${model._contextPath}/web/resources/lib/jqzoom/css/jquery.jqzoom.css" type="text/css">
        <script type="text/javascript" src="${model._contextPath}/web/resources/lib/jqzoom/js/jquery.jqzoom-core-pack.js"></script>
        <script type="text/javascript" src="${model._contextPath}/web/resources/lib/utils/ajaxutil.js"></script>
		<script type="text/javascript" src="${model._contextPath}/web/resources/js/goods.js"></script>
		<script type="text/javascript">
        function getFont(treeId, node) {
			return node.isParent? {'font-weight':'bold'} : {};
		}
		
		var setting = {
			view: {
				showIcon: false,
				showLine: false,
				fontCss: getFont,
				nameIsHTML: true
			},
			data: {
				simpleData: {
					enable: true
				}
			}
		};
		
		$(function(){
			PubOPT.jsEventLoad(pageJsEvent);
		});
		
		function pageJsEvent() {
			$('#categorys').hover(function(){
				$(this).children('.mc').toggle();
			});
			$(".item").hover(function(){
				$(this).toggleClass('hover');
			});
			
			$('#jqzoom').jqzoom({
	            zoomType: 'standard',
	            lens: true,
	            preloadImages: false,
	            alwaysOn: false,
	            title: false,
	            zoomWidth: 400,
	            zoomHeight: 400
	        });
			
			var zNodes =[];
			<#if model.goods_info?exists && model.goods_info?has_content && (model.goods_info?size>0) >
				<#if model.shop_classify?exists && model.shop_classify?has_content>
					<#list model.shop_classify as item>
						zNodes.push({ id:'${item.cls_id}', pId:'${item.pid}', name:'${item.cls_name}', url:'${model._contextPath}/p100028.html?id=${item.shop_id}&cid=${item.cls_id}', target:'_self'});
				    </#list>
				</#if>
				zNodes.unshift({ id:'0', pId:'-1', name:'所有宝贝', url:'${model._contextPath}/p100028.html?id=${model.goods_info[0].shop_id}', target:'_self', open:true});
				<#if model.other_count?exists && model.other_count?has_content>
					<#list model.other_count as item>
						<#if (item.cnt > 0)>
						zNodes.push({ id:'1', pId:'0', name:'其它', url:'${model._contextPath}/p100028.html?id=${model.goods_info[0].shop_id}&cid=1', target:'_self'});
						</#if>
				    </#list>
				</#if>
			</#if>
			$.fn.zTree.init($("#treeCategories"), setting, zNodes);
		}
		</script>
		<style>
	/*	a.zoomThumbActive{border:1px solid red;}*/
		</style>
    </head>
    <body>
		<div id="container">
			<#include "controls/header.ftl">
			<div id="main">
			    <!-- 导航-->
				<div class="Lay_1" style="height:32px">
					<div class="col_2" id="categorys">
						<div class="title_1">全部商品分类</div>
						<div class="mc">
							<#include "controls/categories.ftl">
						</div>
					</div>
					<div class="col_3">
						<#include "controls/top_nav.ftl">
					</div>
				</div>
				<div class="Lay_5">
					<#if model.goods_info?exists && model.goods_info?has_content && (model.goods_info?size>0) >
					<div class="col_7">
						<!-- 搜索-->
						<div class="yu"><input type="text" class="wby"></div><div class="tu"><img src="${model._contextPath}/web/resources/images/dpg_03.jpg" width="80" height="26"></div>
						<!-- 商品分类-->
						<div class="spfl">
							<div class="title_7">商品分类</div>
							<div class="spfl_nr">
								<ul id="treeCategories" class="ztree"></ul>
							</div>
						</div>
					</div>
					<div class="col_8">
						<div class="dqwz" style="border-bottom:1px solid #cccccc">当前位置：<span style="font-size:12px;"><a href="${model._contextPath}/index.jsp">首页</a> &gt; <a href="${model._contextPath}/p100009.html?id=${model.goods_info[0].shop_id}">${model.goods_info[0].shop_name}</a> &gt; ${model.goods_info[0].goods_name}</div>
						<div class="spgm">
							<div class="title_7">${model.goods_info[0].goods_name}</div>	
							<div class="ztu">
								<div class="tu"><a href="${model._contextPath}${model.goods_info[0].relative_path}" id="jqzoom" rel='gal1' title="${model.goods_info[0].goods_name}"><img src="${model._contextPath}${model.goods_info[0].relative_path}" width="310" height="310"></a></div>
								<#if model.goods_images?exists && model.goods_images?has_content && (model.goods_images?size>0) >
								<div>
									<div class="xbt"><img src="${model._contextPath}/web/resources/images/sq_15.jpg"></div>
									<div class="xt">
										<#list model.goods_images as item>
										<div class="xtu">
											<a <#if (item_index==0)>class="zoomThumbActive"</#if> href='javascript:void(0);' rel="{gallery: 'gal1', smallimage: '${model._contextPath}${item.relative_path}',largeimage: '${model._contextPath}${item.relative_path}'}">
												<img src="${model._contextPath}${item.small_relative_path}" width="44" height="44">
											</a>
										</div>
										</#list>
									</div>
									<div class="xbt"><img src="${model._contextPath}/web/resources/images/sq_17.jpg"></div>
								</div>
								</#if>
							</div>
							<div class="wz">
								<#if ((model.goods_info[0].goods_old_price)?number>(model.goods_info[0].goods_price)?number)>
									<div class="zi">价&nbsp;&nbsp;&nbsp;&nbsp;格：<span class="zi1">￥${model.goods_info[0].goods_old_price?number?string("0.##")}</span></div>
									<div class="zi">参加促销：<span class="zi2">限时抢购</span><span class="zi4">￥</span><span class="zi3">${model.goods_info[0].goods_price?number?string("0.##")}</span></div>
									<div class="zi">备&nbsp;&nbsp;&nbsp;&nbsp;注：相关参数见“商品介绍”。</div>
								<#else>
									<div class="zi">价&nbsp;&nbsp;&nbsp;&nbsp;格：<span class="zi4">￥</span><span class="zi3">${model.goods_info[0].goods_price?number?string("0.##")}</span></div>
									<div class="zi">备&nbsp;&nbsp;&nbsp;&nbsp;注：相关参数见“商品介绍”。</div>
									<div class="zi">&nbsp;</div>
								</#if>
								<div class="zi">&nbsp;</div>
								<div class="zi">&nbsp;</div>
								<div class="zi">&nbsp;</div>
								<div class="zi">购买数量： <span id="btn_lower" class="kuang1" style="cursor:pointer">-</span><span class="kuang"><input id="num" name="textfield" type="text" class="kuanga" value="1" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/></span><span id="btn_add" class="kuang2" style="cursor:pointer">+</span>件 </div>
								<div class="zi"><img id="nowBuy" style="cursor:pointer" src="${model._contextPath}/web/resources/images/sq_11.jpg" width="135" height="37"> <img id="addCart" style="cursor:pointer" src="${model._contextPath}/web/resources/images/sq_13.jpg" width="138" height="37"></div>
							</div>
						</div>
						<!-- 商品详情-->
						<div class="spxq">
							<div class="title_8">
								<div tab="tab1" class="title_8a_select"> <a href="javascript:toggleTab('tab1');">商品介绍</a></div>
								<div tab="tab2" class="title_8a"> <a href="javascript:toggleTab('tab2');">商品评价（80）</a></div>
								<div tab="tab3" class="title_8a"> <a href="javascript:toggleTab('tab3');">购买记录</a></div>
							</div>
							<div tabid="tab1" style="margin:10px">
							  	${model.goods_info[0].detail}
							</div>
							<div tabid="tab2" style="margin:10px; display:none;">
								商品评价
							</div>
							<div tabid="tab3" style="margin:10px; display:none;">
								购买记录
							</div>
						</div>
					</div>
					</#if>
				</div>
			</div>
				<div width="100%" height="127"> 
					<#include "controls/footer.ftl">
				</div>
			</div>
		</div>
    </body>
</html>